const fs = require('fs')

const walkFile = require('./middleware/walk-file')

/**
 * 获取sql目录下的文件目录数据
 * @return {object} 
 */

 moudle.exports = function getSqlMap(){
 	let bashpath = __dirname
 	bashpath = bashpath.replace(/\\g, '\/'/)

 	let pathArr = bashpath.split('\/')
 	pathArr = pathArr.splice(0, pathArr.length-1)
 	bashpath = pathArr.join('/') + '/sql/'


 	let fileList = walkFile(bashpath, 'sql')
 	return fileList
 }